//
//  NSString+CustomString.h
//  FinanceProject
//
//  Created by 陈显摆 on 2025/1/15.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (CustomString)

/**
 * 判断字符串是否为空
 */
+ (BOOL)isBlankString:(NSString *)string;

/**
 * 判断是否包含表情
 */
+ (BOOL)isContainsEmoji:(NSString *)string;

/**
 * 中文string 转码 用在URL
 */
+ (NSString *)changeChineseString:(NSString *)string;

/**
 * 转拼音
 */
+ (NSString *)transfromToPinyin:(NSString *)string;

/**
 * 大写字母转小写
 */
+ (NSString *)changetoLower:(NSString *)str;

/**             
 * 时间戳(10位)转时间 YYYY-MM-dd HH:mm:ss
 */
+ (NSString *)timestampSwitchTime:(NSInteger)timestamp andFormatter:(NSString *)format;


/**
 *  大金额数字 每三位插入逗号
 */
NSString *formatAmount(NSDecimalNumber *amount);

+ (void)stringToAttribute:(NSMutableAttributedString *)attributeString font:(UIFont *)font range:(NSRange)range;

+ (void)stringToAttribute:(NSMutableAttributedString *)attributeString color:(UIColor *)color range:(NSRange)range;


+ (NSString *)toCapitalLetters:(NSString *)money;


@end

NS_ASSUME_NONNULL_END
